#include <stdio.h>

int main(){
int n,i,prev,next,lastNext;	
	
do{

printf("Enter n>=0:");
scanf("%d",&n);
if(n<=0){
	printf("wrong input");
}
else{
	prev=0;
	lastNext=0;
	next=1;
	for(i=1;i<=n;i++){
		lastNext=next;
		next=prev+next;
		prev=lastNext;
	}
	
		printf("The Fibonacci of %d is %d",n ,next);

}

}while(n<=0);





}
